package
{
	import flash.utils.Dictionary;

	public class LangFile
	{
		private var lang = Registry.mainLang;
		public var en_us_Dictionary = new Dictionary();
		public var gr_Dictionary = new Dictionary();
		
		public function LangFile()
		{
			Registry.initDB();
			Registry.getOptions();
			lang = Registry.mainLang;
			//constructor
			lang=='gr'?LangFileInit_GR(): LangFileInit_EN();  //Initialize dictionaries
		}
		
		public function LangFileInit_GR()
		{
			gr_Dictionary['posted']			= "Αναρτήθηκε πρίν από ";
			gr_Dictionary['minutes']		= " λεπτά";
			gr_Dictionary['hours']			= " ώρες";
			gr_Dictionary['days']			= " μέρες";
			gr_Dictionary['months']			= " μήνες";
			gr_Dictionary['ago']			= "";
			gr_Dictionary['years']			= " χρόνια";
			gr_Dictionary['exitLabel']  	= "Έξοδος";
			gr_Dictionary['add']			= "Πρόσθεση";
			gr_Dictionary['web']			= "Ιστός";
			gr_Dictionary['notes']			= "Σημειώσεις";
			gr_Dictionary['search']			= 'Αναζήτηση';
			gr_Dictionary['form_name']  	= "Όν/Επώνυμο";
			gr_Dictionary['form_mobile']	= "Αρ.Κινητού";
			gr_Dictionary['form_phone']		= "Αρ.Τηλεφώνου";
			gr_Dictionary['form_mail']		= "Ηλ.Ταχυδρομείο";
			gr_Dictionary['form_twitter']	= "Λογ.Twitter";
			gr_Dictionary['form_favorite']	= "Πρόσθεση σε Αγαπημένα";
			gr_Dictionary['readQR']			= 'Ανάγνωση';
		}
		
		public function LangFileInit_EN()
		{
			en_us_Dictionary['posted']			= "Posted ";
			en_us_Dictionary['minutes']			= " minutes";
			en_us_Dictionary['hours']			= " hours";
			en_us_Dictionary['days']			= " days";
			en_us_Dictionary['months']			= " months";
			en_us_Dictionary['years']			= " years";
			en_us_Dictionary['ago']				= " ago";
			en_us_Dictionary['exitLabel']		= "Exit";
			en_us_Dictionary['add']				= "Add Gib";
			en_us_Dictionary['web']				= "Web";
			en_us_Dictionary['notes']			= "Notes";
			en_us_Dictionary['search']			= "Search";
			en_us_Dictionary['form_name']  		= "Name";
			en_us_Dictionary['form_mobile']		= "Mobile";
			en_us_Dictionary['form_phone']		= "Phone";
			en_us_Dictionary['form_mail']		= "Mail";
			en_us_Dictionary['form_twitter']	= "Twitter";
			en_us_Dictionary['form_favorite']	= "Add to Favorites"
			en_us_Dictionary['readQR']			= 'Scan';
		}
		
		
		function getGreek()
		{
			return gr_Dictionary();
		}
		
		public function getLabel(value)
		{
			if(lang=="en")
				return en_us_Dictionary[value];
			else if(lang=="gr")
				return gr_Dictionary[value];
			
		}
	}
}